const path = require("path");
const pxtorem = require('postcss-pxtorem');

function resolve(dir) {
    return path.join(__dirname, dir)
}
module.exports = {
    configureWebpack: {
        resolve: {
            alias: {
                "assets": resolve("src/assets"),
                "style": resolve("src/assets/style")
            }
        }
    },
    outputDir: 'dist',
    publicPath: process.env.NODE_ENV === 'production' ? '/vant-music/' : '/',
    css: {
        loaderOptions: {
            postcss: {
                plugins: [
                    pxtorem({
                        rootValue: 37.5,
                        propList: ['*']
                    })
                ]
            }
        }
    }
}